home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / catD / pollwakeup.z / pollwakeup
Encoding:
Text File  |  2002-10-03  |  5.0 KB  |  132 lines

  1.  
  2.  
  3.  
  4. ppppoooollllllllwwwwaaaakkkkeeeeuuuupppp((((DDDD3333))))                                                  ppppoooollllllllwwwwaaaakkkkeeeeuuuupppp((((DDDD3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _pppp_oooo_llll_llll_wwww_aaaa_kkkk_eeee_uuuu_pppp - inform polling processes that an event has occurred
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_pppp_oooo_llll_llll_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_dddd_dddd_iiii_...._hhhh_>>>>
  14.      _vvvv_oooo_iiii_dddd _pppp_oooo_llll_llll_wwww_aaaa_kkkk_eeee_uuuu_pppp_((((_ssss_tttt_rrrr_uuuu_cccc_tttt _pppp_oooo_llll_llll_hhhh_eeee_aaaa_dddd _****_p_h_p_,,,, _ssss_hhhh_oooo_rrrr_tttt _e_v_e_n_t_))))_;;;;
  15.  
  16.    AAAArrrrgggguuuummmmeeeennnnttttssss
  17.      _p_h_p       Pointer to a _pppp_oooo_llll_llll_hhhh_eeee_aaaa_dddd structure.
  18.  
  19.      _e_v_e_n_t     Event to notify the process about.
  20.  
  21. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.      The _pppp_oooo_llll_llll_wwww_aaaa_kkkk_eeee_uuuu_pppp function provides non-STREAMS character drivers with a way
  23.      to notify processes polling for the occurrence of an event.
  24.  
  25.    RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
  26.      None
  27.  
  28. UUUUSSSSAAAAGGGGEEEE
  29.      _pppp_oooo_llll_llll_wwww_aaaa_kkkk_eeee_uuuu_pppp should be called from the driver for each occurrence of an
  30.      event.  Events are described in _pppp_oooo_llll_llll(D2).
  31.  
  32.      The _pppp_oooo_llll_llll_hhhh_eeee_aaaa_dddd structure will usually be associated with the driver's
  33.      private data structure for the particular minor device where the event
  34.      has occurred.
  35.  
  36.      _pppp_oooo_llll_llll_wwww_aaaa_kkkk_eeee_uuuu_pppp should only be called with one event at a time.
  37.  
  38.    LLLLeeeevvvveeeellll
  39.      Base or Interrupt.
  40.  
  41.    SSSSyyyynnnncccchhhhrrrroooonnnniiiizzzzaaaattttiiiioooonnnn CCCCoooonnnnssssttttrrrraaaaiiiinnnnttttssss
  42.      Does not sleep.
  43.  
  44.      Driver-defined basic locks, read/write locks, and sleep locks may be held
  45.      across calls to this function.
  46.  
  47.      Note that the portions of the driver which implement the driver's poll()
  48.      routine and the lower layer which calls _pppp_oooo_llll_llll_wwww_aaaa_kkkk_eeee_uuuu_pppp must agree on some
  49.      fundamental synchronization between themselves.  Often this will be done
  50.      via a lock to prevent the lower layer interrupt code and upper layer poll
  51.      routine from manipulating state bits simultaneously or examining
  52.      inconsistent state.  Of particular import is the poll() routine's
  53.      snapshot of the driver's _pppp_oooo_llll_llll_hhhh_eeee_aaaa_dddd generation number (if the driver has a
  54.      _pppp_oooo_llll_llll_hhhh_eeee_aaaa_dddd).  This snapshot must occur either within the inter-locked code
  55.      in the poll() routine to hold off any call to _pppp_oooo_llll_llll_wwww_aaaa_kkkk_eeee_uuuu_pppp in the lower
  56.      layer, or it must be done before any event state is examined if there is
  57.      no inter-lock between the high and low layers of the driver.  Of similar
  58.      concern, the lower level layer must either call _pppp_oooo_llll_llll_wwww_aaaa_kkkk_eeee_uuuu_pppp within an
  59.      interlocked synchronization section or must call after all device state
  60.  
  61.  
  62.                                                                         PPPPaaaaggggeeee 1111
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. ppppoooollllllllwwwwaaaakkkkeeeeuuuupppp((((DDDD3333))))                                                  ppppoooollllllllwwwwaaaakkkkeeeeuuuupppp((((DDDD3333))))
  70.  
  71.  
  72.  
  73.      queried by the poll() routine has been updated.  See _pppp_oooo_llll_llll(D2) for an
  74.      explanation of the race condition that is detected by this rule.
  75.  
  76. RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
  77.      _pppp_oooo_llll_llll(2), _pppp_oooo_llll_llll(D2)
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                                                         PPPPaaaaggggeeee 2222
  129.  
  130.  
  131.  
  132.